Visualizing High-Resolution Grids

Important:

The data used in this notebook is not hosted within the cookbook repository.

import uxarray as ux
grid_path = r"C:\Users\chmie\Downloads\x1.41943042.grid.nc"
data_path = r"C:\Users\chmie\Downloads\diag.2016-08-02_08.15.00.nc"
uxds = ux.open_dataset(grid_path, data_path)
uxds
<xarray.UxDataset> Size: 16GB
Dimensions:             (time: 1, StrLen: 64, n_face: 41943042, n_node: 83886080)
Coordinates:
  * time                (time) datetime64[ns] 8B 2016-08-02T08:15:00
Dimensions without coordinates: StrLen, n_face, n_node
Data variables: (12/94)
    xtime_old           (time, StrLen) |S1 64B ...
    lh                  (time, n_face) float32 168MB ...
    hfx                 (time, n_face) float32 168MB ...
    meanT_500_300       (time, n_face) float32 168MB ...
    taux                (time, n_face) float32 168MB ...
    tauy                (time, n_face) float32 168MB ...
    ...                  ...
    aclwdnt             (time, n_face) float32 168MB ...
    aclwnett            (time, n_face) float32 168MB ...
    rainc               (time, n_face) float32 168MB ...
    rainnc              (time, n_face) float32 168MB ...
    xtime               (time, StrLen) |S1 64B ...
    zgrid               (n_face) float32 168MB ...

Polygons

%%time
uxds["relhum_200hPa"][0].plot.polygons(rasterize=True)
CPU times: total: 23 s
Wall time: 2min 12s
%%time
uxds["relhum_200hPa"][0].plot.polygons(rasterize=True)
CPU times: total: 5.67 s
Wall time: 15.7 s

Points

%%time
uxds["relhum_200hPa"][0].plot.points(rasterize=True)
CPU times: total: 344 ms
Wall time: 1.34 s
%%time
res = uxds["relhum_200hPa"][0].plot.points(rasterize=True)
CPU times: total: 188 ms
Wall time: 737 ms